package hypeerweb;

import java.io.Serializable;

public class CapNodeState extends NodeState implements Serializable  {
	private static final long serialVersionUID = 2913201056183494998L;

	/**
	 * The StandardNodeState's singleton
	 */
	public static CapNodeState singleton;

	/**
	 * The integer value that represents which state the Node is in
	 */
	public static final int STATE_ID = 2;

	/**
	 * default constructor
	 */
	private CapNodeState() {}

	/**
	 * initializes this nodes state and returns it
	 */
	public static CapNodeState getSingleton() {
		if (singleton == null) {
			singleton = new CapNodeState();
		}
		return (CapNodeState) singleton;
	}

	/**
	 * Returns the value from the call of findInsertionPointFrom on its self
	 * 
	 * @param Node
	 *            refNode
	 */
	public Node findCapNodeFrom(Node refNode) {
		return refNode;
	}

	/**
	 * Method getStateID returns the enumerated id of this state
	 * 
	 * @pre <i>None</i>
	 * @post result = STATE_ID
	 */
	public int getStateId() {
		return STATE_ID;
	}

	/**
	 * toString method
	 */
	public String toString() {
		return "Cap Node State";
	}
}
